Skip to content

Feat: Automatically drop Element suffix from controller names#43

Merged
keithamus merged 3 commits intomasterfrom
drop-element-suffix
Jun 19, 2020
Merged

Feat: Automatically drop Element suffix from controller names#43
keithamus merged 3 commits intomasterfrom
drop-element-suffix

Conversation

@keithamus
Copy link
Copy Markdown
Contributor

@keithamus keithamus commented Jun 19, 2020

This adds some code to drop the Element suffix from class names when they get converted to a tag, so for example:

  • HelloWorldElement becomes <hello-world>
  • UserListElement becomes <user-list>
  • TeamMembersElement becomes <team-members>

This is a backwards incompatible change, as any previous elements registered with an Element suffix will now have different tag names, but we're still pre 1.0 so this won't necessitate a major version bump.

This does not affect any existing classes suffixed with Controller, they will remain the same.

This also updates the docs to reflect these changes. A lot of the docs changes overlap with #42 but we won't close that issue as it has other useful changes.

Relevant docs changes

@keithamus keithamus requested a review from a team as a code owner June 19, 2020 14:17
@github-pages github-pages Bot temporarily deployed to github-pages June 19, 2020 14:17 Inactive
Copy link
Copy Markdown
Contributor

@dgraham dgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@keithamus keithamus merged commit 81db73b into master Jun 19, 2020
@keithamus keithamus deleted the drop-element-suffix branch June 19, 2020 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants